/*
 * Created by Administrator on 2017/3/31.
 */

var InvestRecord = React.createClass({
    getDefaultProps: function() {
        return{
            data:[]

        }
    },
    componentDidMount:function(){

    },
    render: function () {
        return(<div>
            {this.props.data.map(function (item,index) {
                return (
                    <div className="item">
                        <h3>{item.ProjectName}</h3>
                        <ul className="clearfix">
                            <li>投资本金：<span>{item.PayAmount}</span>元</li>
                            <li>预期收益：<span>{item.Income}</span>元</li>
                            <li>项目起息日：{item.ValueBegin}</li>
                            <li>项目到期日：{item.RepayBegin}</li>
                        </ul>
                        <a href={item.ProjectUrl} className="detail">项目详情&gt;&gt;</a>
                        <div className={"stauts "+(item.UserCenterOrderStatus.value ==10
                            ? "" : item.UserCenterOrderStatus.value ==60
                            ? "" : item.UserCenterOrderStatus.value ==70
                            ? "" : 'stauts-2')}>
                            <i className={"iconfont " + (item.UserCenterOrderStatus.value == 10
                                ? "icon-stautsf" : item.UserCenterOrderStatus.value == 60
                                ? "icon-stautsf" : item.UserCenterOrderStatus.value == 70
                                ? "icon-stautsf" : "icon-stautss")}></i>{item.UserCenterOrderStatus.text}
                        </div>
                    </div>
                )
            })}
            </div>
            )

    }
})

module.exports = InvestRecord;